//
//  ViewController.m
//  ZBUtils
//
//  Created by Never on 2018/3/28.
//  Copyright © 2018年 Never. All rights reserved.
//

#import "ViewController.h"
#import "ZBCheckOutUtils.h"

@interface ViewController ()<UITextFieldDelegate>

@property (weak, nonatomic) IBOutlet UITextField *textField;
@property (weak, nonatomic) IBOutlet UIButton *checkBtn;
@property (weak, nonatomic) IBOutlet UILabel *textLab;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
}

- (IBAction)checkBtnAction:(UIButton *)sender {
    
    if (!self.textField.text) {
        return;
    }
    BOOL isCardNum  = [ZBCheckOutUtils validPhoneNumber:self.textField.text];
    
    if (isCardNum) {
        self.textLab.text = @"校验结果：该号码手机号";
    }else{
        self.textLab.text = @"校验结果：该号码不是手机号";
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
    
}


@end
